FROM pig4cloud/java:8-jre

ENV TZ=Asia/Shanghai
ENV JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"

RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN mkdir -p /code-gen

WORKDIR /code-gen

EXPOSE 9527

ADD ./target/code-gen.jar ./

CMD sleep 10;java $JAVA_OPTS -jar code-gen.jar